package com.ibm.sc.osp.sample.api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication(scanBasePackages = {"com.ibm.sc.osp.sample",
    "com.ibm.sc.osp.common.config", "com.ibm.sc.osp.common.restservice"}, exclude = {CacheAutoConfiguration.class, RabbitAutoConfiguration.class, FreeMarkerAutoConfiguration.class, MongoAutoConfiguration.class, MongoRepositoriesAutoConfiguration.class, MongoDataAutoConfiguration.class})
//scanBasePackages启动扫描基础路径 exclude需要排除的自动配置类
//@EnableMongoRepositories(value = {"com.ibm.sc.osp.sample"})
//MongoDB扫描路径,仓库实现类
@EnableEurekaClient
//开启eureka服务,自动注册 *optional需配合cloud-server使用
@EnableHystrix
//开启hystrix熔断服务 *optional需配合cloud-server使用
@EnableSwagger2
//开启swagger自动生成rest文档 *optional需配合cloud-server使用
//@RefreshScope
public class ApiApplication {
    public static void main(String[] args) {
        SpringApplication.run(ApiApplication.class, args);
    }
}
